perm filename GRAPH.1[QLA,LSP] blob
sn#728061 filedate 1983-09-14 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Routines to plot performance of the multiprocessor
C00005 ENDMK
Cā;
;;; Routines to plot performance of the multiprocessor
(eval-when (load)
(fasload ddmid fas dsk (sys rod)))
(declare (special *chan* *points*)
(mapex t)
(*expr ddinit screen erase line dpyup gddchn rddchn))
(defun m-init-graph ()
(declare (fixnum hx hy)(flonum fhx fhy))
(let ((hx 0)
(hy 0)
(fhx 0.0)(fhy 0.0))
(mapc #'(lambda (x)
(cond ((< hx (car x))
(setq hx (car x))))
(cond ((< hy (cadr x))
(setq hy (cadr x)))))
*points*)
(setq fhx (float hx)
fhy (float hy))
(setq *chan*
(gddchn -1))
(ddinit)
(screen 0.0 0.0 fhx fhy)
(erase *chan*)
(line 0.0 0.0 0.0 fhy)
(line 0.0 0.0 fhx 0.0)
(let ((ox (float (caar *points*)))
(oy (float (cadar *points*))))
(do ((p (cdr *points*) (cdr p))
(nx 0.0)(ny 0.0))
((null p) (dpyup *chan*))
(setq nx (float (caar p)))
(setq ny (float (cadar p)))
(line ox oy nx ny)
(setq ox nx oy ny)))))
(defun m-add-graph ()
(declare (fixnum hx hy)(flonum fhx fhy))
(let ((ox (float (caar *points*)))
(oy (float (cadar *points*))))
(do ((p (cdr *points*) (cdr p))
(nx 0.0)(ny 0.0))
((null p) (dpyup *chan*))
(setq nx (float (caar p)))
(setq ny (float (cadar p)))
(line ox oy nx ny)
(setq ox nx oy ny))))
(defun m-uninit ()
(erase *chan*)
(rddchn *chan*))
(defun m-reference ()
(let ((high (float (cadr (car *points*))))
(n 0.0))
(let ((*points*
(mapcar #'(lambda (x)
(setq n (+$ 1.0 n))
`(,(car x)
,(//$ high
n)))
*points*)))
(m-add-graph))))